#include "ICameraDiagServlet.h"
#include "IContainer.h"
#include "ILogger.h"
class TestClientPlugin : public IPlugin {
public:
    void onLoad(INode *node) {
        IContainer * container = Bean<IContainer>("cameraDiag").pointer();
        if (container)
        container->on(OPEN,[=](ISession * session) ->int{
            LogI("send openCamera");
            session->Business<ICameraDiagServlet>()->openCamera(session->getServlet());
            session->Business<ICameraDiagServlet4Test>()->openCamera4Test(session->getServlet(),100,200);
            session->Business<ICameraDiagServlet4Test>()->openCamera4TestString(session->getServlet(),1000,"hello,world");
            std::vector<std::string> aa;
            aa.push_back("xxxx");
            aa.push_back("yyyy");
            session->Business<ICameraDiagServlet4Test>()->openCamera4TestVector(session->getServlet(),aa);
            return 0;
        });
    }
};

REG_PLUGIN(TestClientPlugin);
